package com.hnevc.inner;

class Outer {
	private int num = 4; //成员变量
	
	public void test(){
		Inner inner = new Inner();
		inner.show();
		System.out.println("外部类的Outer.test()方法");
	}
	
	class Inner{
		void show(){
			System.out.println("内部类Inner.show方法,访问外部类的num="+num);
		}
	}
}

public class Test{
	public static void main(String[] args){
		Outer.Inner inner = new Outer().new Inner();
		inner.show();
	}
}
